#ifndef CFDL_LOGIN_H
#define CFDL_LOGIN_H

#include <QObject>
#include "comm_impl.h"
#include "cfdl_ptl_type.h"

#define DEV_NUM (8)

class cfdl_login : public QObject
{
    Q_OBJECT
public:
    explicit cfdl_login(QObject *parent = nullptr);

    static cfdl_login* Instance();

signals:
    void signalLog(UsrCommImpl::logType, const QString&, const QString&);
    void signalDevLogin(uint8_t vid, uint16_t pid, uint8_t chid);

public:
    void cfdl_msg_cb(cfdl_message_t*);
    void cfdl_msg_err(cfdl_message_t*);

private:
    CFID devID[DEV_NUM];
    uint8_t devNum = 0;
};

#endif // CFDL_LOGIN_H
